<template>
	<view>
		<uqrcode ref="uqrcode" canvas-id="qrcode" :value="link" :options="options" :size="100" @change="changeQrcode"></uqrcode>
	</view>
</template>

<script>
	export default {
		name:"qrcode",
		data() {
			return {
				link:'https://uqrcode.cn/doc',
				options:{
					margin:10
				}
			};
		},
		methods: {
			remakeQrcode() {
				this.$refs.uqrcode.remake({
					success:(res)=>{
						console.log('remake success',res);
					},
					fail:error=>{
						console.log('remake error',e);
					}
				})
			},
			changeQrcode(){
				console.log(11);
			}
		},
	}
</script>

<style lang="scss">

</style>